#include <iostream>
using namespace std;

int* getIntArr(int& size) {
    // int arr[] = { 0, 0, 0 };
    int* arr = new int[5]{ 0, 1, 2 };
    size = 5;
    return arr;
}

void print(const int* arr, const int& size) {
    for(int i = 0; i < size; i++) {
        cout << arr[i] << " ";
    }
    cout << endl;
}

int main() {
    int size = 0;
    int* arr = getIntArr(size);
    print(arr, size);
    delete [] arr;
    return 0;
}